<!--
/**
 * readme.html
 *
 * NMIT BIT Project - Infinity - A 3D Website using WebGL & HTML5 Technology
 * Infinity Grid Version 
 * Version: 1.0 Beta 2
 *
 * Author: William Liu <qzliuyuzou@gmail.com> <lyzdev@gmail.com>
 *
 * Required Server Version:
 *  PHP5 or higher
 *  MySQL 5 or higher
 *
 * Required Browser Version:
 *  Google Chrome 9 or higher
 *  Mozilla Firefox 4 Beta or higher
 *  *Apple Safari
 *
 * Copyright (c) 2011, William Liu All rights reserved.
 * Infinity is an open source 3D website project
 * Under Apache License 2.0
 * http://www.lyzsoft.cn
 * http://7cloud.wordpress.com
 *
 * Project Starting date: 9/3/2011
 * Update Date 1: 17/6/2011
 *
**/
-->


<!DOCTYPE html>
<html>
<head>
<meta content="en-us" http-equiv="Content-Language">
<meta charset="utf-8">
<meta name="keywords" content="WebGL,Three.js,HTML5,3D,php,jquery" />
<meta name="description" content="WebGL,Three.js,HTML5,3D,php,jquery"/>

<title>Infinity - Read Me</title>

  <script type="text/javascript" src="js/Three.js"></script> 
  <script type="text/javascript" src="js/Detector.js"></script>
  <script type="text/javascript" src="js/RequestAnimationFrame.js"></script>
  <link rel="stylesheet" type="text/css" href="style.css"/>
  
<style type="text/css">
.auto-style1 {
	font-size: xx-large;
	color: #A1FF66;
}
</style>


</head>


<body>
<div id="main">
	<div id="info"> 
		<h1 class="auto-style1">About</h1>
	</div> 
	 
	<div id="bio" style="width:960px; position:" class="msgmanagetitle">
			
				<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 微软雅黑; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
				<span class="Apple-style-span" style="color: rgb(210, 216, 222); font-size: 12px; ">
				<h2 style="margin-top: 0.1em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: normal; font-style: inherit; font-size: 2.1em; text-align: left; line-height: 1em; color: rgb(255, 255, 255); ">
				Infinity</h2>
				<h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: normal; font-style: inherit; font-size: 1.2em; text-align: left; line-height: 1em; color: rgb(161, 255, 102); ">
				Hi! Infinity is a 3D website!</h4>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				Infinity is the thir year project of
				NMIT BIT Project, undertaken by William Liu.</p>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				The user interface is power by WebGL & HTML5 Technology
				and the website is power by PHP.</p>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				And it is an open source project, under Apache License 2.0</p>
				<h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: normal; font-style: inherit; font-size: 1.2em; text-align: left; line-height: 1em; color: rgb(161, 255, 102); ">
				My First Web Application...</h4>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				After three month hard works, it finally finished, although it 
				is a prototype, however it opens up a new direction of web 
				development.</p>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				As 
				my first web application, it works well and I am happy with it. 
				However it is not perfect, still have lots problem, but I am 
				going to continue work on it :)</p>
				<div class="hr" style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: inherit; font-weight: inherit; font-style: inherit; font-size: 12px; text-align: left; clear: both; height: 2px; background-image: url(http://coda.co.za/img/global/sep_horizontal.png); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: 0px 0px; background-repeat: repeat no-repeat;">
				</div>
				<h2 style="margin-top: 0.1em; margin-right: 0px; margin-bottom: 0.6em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: normal; font-style: inherit; font-size: 2.1em; text-align: left; line-height: 1em; color: rgb(255, 255, 255); ">
				About ME</h2>
				<h4 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-weight: normal; font-style: inherit; font-size: 1.2em; text-align: left; line-height: 1em; color: rgb(161, 255, 102); ">
				A person who love IT.</h4>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				I'm a Chinese student who always want a lot of knowledge and 
				work in IT industry.</p>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				I Have few other open source projects, such as a Vehicle expenses statistical program, a Flight Map program and a Personal E-Library system.</p>
				<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.3em; margin-left: 0px; padding-top: 0px; padding-right: 1.5em; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Lucida, sans-serif; font-weight: inherit; font-style: inherit; font-size: 1.1em; text-align: left; line-height: 1.4em; ">
				&nbsp;My interests are 
				new technologies, C/C++, PHP, UI design. I enjoy an active outdoor lifestyle:<span class="Apple-converted-space">&nbsp;camping, 
				swiming, play basketball, fishing</span>.</p>
				</span></span>
	</div>
</div>

<script type="text/javascript">
var mainStyle = document.getElementById('main');
var leftPx = (document.body.clientWidth - 960)/2;
mainStyle.style.left = leftPx + "px";
mainStyle.style.position = "absolute";
</script>


<script type="text/javascript"> 
		
			if (!Detector.webgl) {
 
				document.getElementById( "container" ).style.display = "block";
 
			}
 
			var container, stats;
			var camera, scene, renderer, particles, geometry, materials = [], parameters, i, h, color;
			var mouseX = 0, mouseY = 0;
 
			var windowHalfX = window.innerWidth / 2;
			var windowHalfY = window.innerHeight / 2;
 
			init();
			setInterval( loop, 1000 / 60 );
 
			function init() {
 
				container = document.createElement( 'div' );
				document.body.appendChild( container );
 
				camera = new THREE.Camera( 75, window.innerWidth / window.innerHeight, 1, 3000 );
				camera.position.z = 1000;
 
				scene = new THREE.Scene();
				scene.fog = new THREE.FogExp2( 0x000000, 0.0007 );
				
				geometry = new THREE.Geometry();
				
				for ( i = 0; i < 4000; i++ ) {
 
					vector = new THREE.Vector3( Math.random() * 2000 - 1000, Math.random() * 2000 - 1000, Math.random() * 2000 - 1000 );
					geometry.vertices.push( new THREE.Vertex( vector ) );					
					
				}
 
				parameters = [ [ [1.0, 1.0, 1.0], 5 ], [ [0.95, 1, 1], 4 ], [ [0.90, 1, 1], 3 ], [ [0.85, 1, 1], 2 ], [ [0.80, 1, 1], 1 ] ];
				//parameters = [ [ 0xff0000, 5 ], [ 0xff3300, 4 ], [ 0xff6600, 3 ], [ 0xff9900, 2 ], [ 0xffaa00, 1 ] ];
				//parameters = [ [ 0xffffff, 5 ], [ 0xdddddd, 4 ], [ 0xaaaaaa, 3 ], [ 0x999999, 2 ], [ 0x777777, 1 ] ];
				
				for ( i = 0; i < parameters.length; i++ ) {
 
					size  = parameters[i][1];
					color = parameters[i][0];
					
					//materials[i] = new THREE.ParticleBasicMaterial( { color: color, size: size } );
					
					materials[i] = new THREE.ParticleBasicMaterial( { size: size } );
					materials[i].color.setHSV( color[0], color[1], color[2] );
 
					particles = new THREE.ParticleSystem( geometry, materials[i] );
					particles.rotation.x = Math.random() * 6;
					particles.rotation.y = Math.random() * 6;
					particles.rotation.z = Math.random() * 6;
					scene.addObject( particles );
					
				}
 
				renderer = new THREE.WebGLRenderer();
				renderer.setSize( window.innerWidth, window.innerHeight );
				container.appendChild( renderer.domElement );
 
				//stats = new Stats();
				//stats.domElement.style.position = 'absolute';
				//stats.domElement.style.top = '0px';
				//container.appendChild( stats.domElement );
 
				document.addEventListener( 'mousemove', onDocumentMouseMove, false );
				document.addEventListener( 'touchstart', onDocumentTouchStart, false );
				document.addEventListener( 'touchmove', onDocumentTouchMove, false );
				
			}
 
			function onDocumentMouseMove( event ) {
 
				mouseX = event.clientX - windowHalfX;
				mouseY = event.clientY - windowHalfY;
				
			}
 
			function onDocumentTouchStart( event ) {
 
				if ( event.touches.length == 1 ) {
 
					event.preventDefault();
 
					mouseX = event.touches[ 0 ].pageX - windowHalfX;
					mouseY = event.touches[ 0 ].pageY - windowHalfY;
					
				}
			}
 
			function onDocumentTouchMove( event ) {
 
				if ( event.touches.length == 1 ) {
 
					event.preventDefault();
 
					mouseX = event.touches[ 0 ].pageX - windowHalfX;
					mouseY = event.touches[ 0 ].pageY - windowHalfY;
					
				}
				
			}
 
			function loop() {
 
				var time = new Date().getTime() * 0.00005;
				
				camera.position.x += ( mouseX - camera.position.x ) * 0.05;
				camera.position.y += ( - mouseY - camera.position.y ) * 0.05;
 
				for( i = 0; i < scene.objects.length; i++ ) {
				
					scene.objects[i].rotation.y = time * ( i < 4 ? i+1 : - (i+1) );
					
				}
 
				for( i = 0; i < materials.length; i++ ) {
					
					color = parameters[i][0];
					
					h = ( 360 * ( color[0] + time ) % 360 ) / 360;
					materials[i].color.setHSV( h, color[1], color[2] );
					
				}
				
				renderer.render( scene, camera );
 
				//stats.update();
			}			
		</script>
</body>
</html>